﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanySelect_PS.aspx.cs" Inherits="HZ.DrugTrade.Web.Hospitals.Procurement.CompanySelect_PS" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>选择企业</title>
    <link rel="stylesheet" type="text/css" href="../../lib/style/global.css" />
    <!---->
    <script type="text/javascript" src="../../lib/scripts/jquery.js"></script>
    <script type="text/javascript" src="../../lib/scripts/mainlistSelect.js"></script>
    <script type="text/javascript" src="../../lib/scripts/Common.js"></script>
    <script type="text/javascript" src="../../lib/scripts/global.js"></script>
    <script type="text/javascript" language="javascript">
        function addCompanyInfo(CompanyInfo) {
            opener.insertCompanyInfo_PS(CompanyInfo);
            window.close();
        }

    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div class="listsearch">
        <table class="querylist">
            <tr>
                <td style="width: 60px">
                    <asp:Label ID="lblQueryCondition" runat="server" Text="企业名称："></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtCompanyName" runat="server"></asp:TextBox>
                </td>
                <td rowspan="2" style="width: 60px">
                    <hz:HzButton ID="btnQery" runat="server" Text="查询" OnClick="btnQery_Click" CssClass="btn"
                        Width="50px" />
                </td>
            </tr>
            <tr>
                <td style="width: 60px">
                    <asp:Label ID="lblCompanyType" runat="server" Text="企业类型：" Visible="false"></asp:Label>
                </td>
                <td align="left">
                    <asp:DropDownList ID="ddlCompanyType" runat="server" Visible="false">
                        <asp:ListItem Value="0">生产企业</asp:ListItem>
                        <asp:ListItem Value="1">经营企业</asp:ListItem>
                        <asp:ListItem Value="2">配送企业</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
    </div>
    <div class="listip">
        <ul>
            <li>提示：<span>点击企业名即可选择</span></li>
        </ul>
    </div>
    <br />
    
        <asp:GridView ID="gvwCompanyList" runat="server" AutoGenerateColumns="False" 
            CssClass="mainlist" DataKeyNames="CompanyID" EmptyDataText="暂无符合条件的数据！">
            <Columns>
                <asp:TemplateField HeaderText="序号">
                    <ItemTemplate>
                        <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1) %>
                    </ItemTemplate>
                    <HeaderStyle Width="30px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="企业名称">
                    <ItemTemplate>
                        <a href="javascript:addCompanyInfo('<%#Eval("CompanyID") %>|<%# Eval("CompanyName") %>')">
                            <%# Eval("CompanyName") %></a>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="企业类型">
                    <ItemTemplate>
                        <asp:Label ID="lblCompanyType" runat="server" Text='<%# Eval("CompanyType") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    <div class="page">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_OnPageChanged">
        </webdiyer:AspNetPager>
    </div>
    <br />
    <div class="listctrl" >
        <input id="Button1" type="button" onclick="openner=null;window.close();" value="取消"
            class="btn" /></div>
    </form>
</body>
</html>
